C[x](Ma[u], {
    initialize: function(a) {
        this.map = a;
        this.Rh();
        this.L();
        this.Zg && this.Zg.ta(this.map, this);
        this.F.K = this.K;
        C.lang.oa.call(this, this.K);
        this.bb || C.w.G(this.F);
        return this.F
    },
    L: function() {
        function a(a, b) {
            var g = a.srcElement || a.target,
            i = a.clientX || a.pageX,
            j = a.clientY || a.pageY;
            if (a && b && i && j && g) {
                var g = C.w.V(c.ja),
                n = ab();
                b.pixel = b.Aa = new S(i - g.left + n[1], j - g.top + n[0]);
                b.point = c.Ma(b.Aa)
            }
            return b
        }
        if (this.F) {
            var b = this,
            c = this.map;
            C.C(this.F, "mouseover", 
            function(c) {
                b.Af || b.dispatchEvent(a(c, (new Q("onmouseover")).la(c)))
            });
            C.C(this.F, "mouseout", 
            function(c) {
                b.Af || b.dispatchEvent(a(c, (new Q("onmouseout")).la(c)))
            });
            b.v.Jc && (C.C(this.F, "touchstart", 
            function(a) {
                b.L.qn = new S(a.changedTouches[0].clientX, a.changedTouches[0].clientY)
            }), C.C(this.F, "touchend", 
            function(c) {
                var e = Ia(),
                g = new S(c.changedTouches[0].clientX, c.changedTouches[0].clientY);
                10 < p.abs(g.x - b.L.qn.x) || 10 < p.abs(g.y - b.L.qn.y) ? b.L.qn = k: (b.dispatchEvent(a(c, (new Q("onclick")).la(c))), e - b.mq < b.map.J.Jn && b.dispatchEvent(a(c, (new Q("ondblclick")).la(c))), b.mq = e)
            }), Da() || C.C(this.F, "click", 
            function(c) {
                for (var e = c.srcElement || c.target; e;) {
                    if (e == b.F) { (!(b instanceof U) || b instanceof U && (!b.Lm || b.Lm && b.V().Rb(b.Lm))) && b.dispatchEvent(a(c, (new Q("onclick")).la(c)));
                        break
                    } else if (b.map && b.map.ia && e == b.map.ia.kb) break;
                    e = e[ka]
                }
            }), C.C(this.F, "dblclick", 
            function(c) {
                b.dispatchEvent(a(c, (new Q("ondblclick")).la(c)));
                qa(c)
            }), (!C.O.Ke || 4 > C.O.Ke) && C.C(this.F, "contextmenu", 
            function(c) {
                b.dispatchEvent(a(c, (new Q("onrightclick")).la(c)))
            }));
            C.C(this.F, "mousedown", 
            function(c) {
                if (b instanceof U) b.Lm = b.V();
                b.dispatchEvent(a(c, (new Q("onmousedown")).la(c)))
            });
            C.C(this.F, "mouseup", 
            function(c) {
                b.dispatchEvent(a(c, (new Q("onmouseup")).la(c)));
                C.O.Ke >= 4 && (c.button == 2 && b.v.Jc) && b.dispatchEvent(a(c, (new Q("onrightclick")).la(c)))
            })
        }
    },
    G: function() {
        this.bb != l && (this.bb = l, Db[u].G.call(this), this.cb && (this.cb.ya && this.cb.ya == this) && this.Eb())
    },
    show: function() {
        this.bb != f && (this.bb = f, Db[u].show.call(this))
    },
    Pt: function(a) {
        if (a) for (var b in a) typeof this.v[b] == typeof a[b] && (this.v[b] = a[b])
    },
    Il: function(a) {
        this.zIndex = a;
        this.Vf()
    },
    Vf: function() {
        var a;
        eb(this.zIndex) ? a = this.zIndex: (a = 0, this.map && this.V() && (a = this.V() ? this.V().lat: 0, a = Db.Vi(a) + (this.v.Gr || 0)));
        this.F && (this.F.style.zIndex = a)
    },
    hh: function(a) {
        this.Zg = a;
        this.map && a.ta(this.map, this)
    },
    Dh: function() {
        this.Zg.remove();
        this.Zg = k
    }
});
Z(Mc, {
    show: Mc.show,
    hide: Mc.G,
    addContextMenu: Mc.hh,
    removeContextMenu: Mc.Dh
});
var Bd = new Ib(J.Z + "marker_red_hd.png", new P(23, 25), {
    anchor: new P(10, 25),
    infoWindowAnchor: new P(10, 0),
    imageSize: new P(23, 25)
});
U.Ij = Db.Vi( - 90) + 1E6;
U.Mp = U.Ij + 1E6;
U.zv = function(a) {
    if (U.Pj[a]) 
    	return U.Pj[a];
    var b = U.Pj[a] = ["BMap_" + p.round(1E4 * p.random()), "BMap_" + p.round(1E4 * p.random())],
    c = Qb[a],
    d = U.mx;
    d || (d = U.mx = M("style", {
        type: "text/css"
    }), da.getElementsByTagName("head")[0][v](d));
    d.textContent += U.rq(c.wg, b[0]) + U.rq(c.qj, b[1]);
    return U.Pj[a]
};
U.rq = function(a, b) {
    var c = ["@-webkit-keyframes " + b + " {\\n"];
    C.Qb.Dd(a, 
    function(a) {
        c.push(100 * a.La, "% { ");
        c.push("-webkit-transform: translate(", a.translate[0], "px,", a.translate[1], "px); ");
        c.push("-webkit-animation-timing-function: ", a.Oa, "; ");
        c.push("}\\n")
    });
    c.push("}\\n");
    return c.join("")
};
U.Ku = function(a, b) {
    if (!U.Wd && (U.Wd = M("img", {
        src: J.Z + "drag_cross.png",
        width: 13,
        height: 9
    }), U.Wd.style[la] = "absolute", 6 == C.O.T)) {
        delete U.Wd;
        var c = (U.Wd = M("div")).style;
        c[la] = "absolute";
        c[y] = "13px";
        c[A] = "9px";
        c.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image,src="' + J.Z + 'drag_cross.png")'
    }
    c = U.Wd.style;
    c.left = a[y] - 6 + "px";
    c.top = a[A] - 5 + "px";
    b[v](U.Wd)
};
U.Hw = function() {
    if (U.Wd && U.Wd[ka]) U.Wd[ka][ga](U.Wd)
};
U.Pj = [];
U.cq = function() {
    this.style.WebkitAnimation = ""
};
C[x](U[u], {
    initialize: function(a) {
        this.Ff();
        Ma[u].initialize.call(this, a);
        this.bb || C.w.G(this.fb);
        a.ie() && this.v.Jd == Lb && (this.v.Jd = Bd);
        this.ca(this.N);
        this.se(this.v.Jd);
        this.Hl(this.v.vf);
        if (this.v.label && this.Mj) this.v.label[B]("remove", this.Mj);
        this.Hg(this.v.label);
        this.xb(this.v.title);
        this.Em();
        return this.F
    },
    Ff: function() {
        this.hi || (this.hi = f, this.Rc = this.fb = this.Kb = this.F = k, this.Gf = l)
    },
    Rh: function() {
        var a = this.map.ge();
        this.F = Za(a.Vo, this.rw());
        this.fb = Za(a.ft, this.lw());
        this.fb.K = this.K
    },
    rw: function() {
        var a = ['<span class="BMap_Marker BMap_noprint" unselectable="on" '];
        a.push(this.v.title ? 'title="' + this.v.title + '"': '"');
        a.push(' style="position:absolute;padding:0;margin:0;border:0;width:0;height:0;-moz-user-select:none;');
        a.push(this.v.Jc ? "cursor:pointer;": "");
        a.push("background:url(" + J.Z + "blank.gif);");
        a.push("width:" + this.v.Jd.size[y] + "px;");
        a.push("height:" + this.v.Jd.size[A] + "px;");
        a.push('"></span>');
        return a.join("")
    },
    lw: function() {
        var a = ['<span class="BMap_Marker" unselectable="on" '];
        a.push('style="position:absolute;padding:0;margin:0;border:0;');
        a.push('width:0;height:0;-moz-user-select:none"></span>');
        return a.join("")
    },
    dx: function() {
        var a = ['<span unselectable="on" '];
        a.push('style="position:absolute;padding:0;margin:0;border:0;');
        a.push('width:0;height:0;-moz-user-select:none"></span>');
        return a.join("")
    },
    draw: function() {
        if (this.F) {
            var a = this.Pv();
            this.F.style.left = a[0].x + "px";
            this.F.style.top = a[0].y + "px";
            this.fb && (this.fb.style.left = a[0].x + "px", this.fb.style.top = a[0].y + "px");
            this.Kb && (this.Kb.style.left = a[1].x + "px", this.Kb.style.top = a[1].y + "px");
            this.cb != k && this.cb.qa() && this.cb.ca();
            this.Vf()
        }
    },
    Pv: function() {
        var a = this.v.Y || new P(0, 0),
        b = this.v.Jd.anchor || new P(0, 0),
        c = this.map.Pd(this.V()),
        b = [new S(c.x + a[y] - b[y], c.y + a[A] - b[A])];
        if (this.v.vf) {
            var d = this.v.vf.anchor || new P(0, 0);
            b[1] = new S(c.x + a[y] - d[y], c.y + a[A] - d[A])
        }
        return b
    },
    Ob: function() {
        this.map ? (this.F = this.initialize(this.map), this.Th && (this.Gg(this.Th), delete this.Th)) : delete this.Th
    },
    remove: function() {
        this.Gg(k);
        if (this.fb && this.fb[ka]) this.fb[ka][ga](this.fb);
        if (this.Kb && this.Kb[ka]) this.Kb[ka][ga](this.Kb);
        this.cb && (this.cb.ya && this.cb.ya === this) && (this.Eb(), this.cb = k);
        this.Ta = this.Rc = this.Kb = this.fb = k;
        if (this.v.label) {
            var a = this.v.label;
            a.removeEventListener("remove", this.Mj);
            C.lang.Ok(a.K);
            a.Qt(k);
            a.F = k;
            this.v.label = k
        }
        Ma[u].remove.call(this)
    },
    G: function() {
        Ma[u].G.call(this);
        this.F && C.w.G(this.F);
        this.fb && C.w.G(this.fb);
        this.Kb && C.w.G(this.Kb)
    },
    show: function() {
        Ma[u].show.call(this);
        this.F && C.w.show(this.F);
        this.fb && C.w.show(this.fb);
        this.Kb && C.w.show(this.Kb)
    },
    se: function(a) {
        if (a instanceof Ib && (this.v.Jd = a, this.map && this.F && this.fb)) {
            try {
                this.Rc && (this.fb[ga](this.Rc), this.Rc = k),
                this.F.style[y] = a.size[y] + "px",
                this.F.style[A] = a.size[A] + "px"
            } catch(b) {}
            if (this.v.Jd) {
                var c = this.Rc = M("div"),
                d = c.style;
                d[la] = "absolute";
                d.padding = d.margin = "0";
                d[y] = a.size[y] + "px";
                d[A] = a.size[A] + "px";
                d.overflow = "hidden";
                c.innerHTML = a.ws();
                c.ns = l;
                this.fb[v](this.Rc)
            }
            this.draw()
        }
    },
    Hl: function(a) {
        if (a instanceof Ib && (this.v.vf = a, this.map && this.F && this.fb)) {
            this.Kb || (this.Kb = Za(this.map.ge().gt, this.dx()));
            try {
                this.Ta && (this.Kb[ga](this.Ta), this.Ta = k),
                this.Kb.style[y] = a.size[y] + "px",
                this.Kb.style[A] = a.size[A] + "px"
            } catch(b) {}
            if (this.v.vf) {
                var c = this.Ta = M("div"),
                d = c.style;
                d[la] = "absolute";
                d.padding = d.margin = "0";
                d[y] = a.size[y] + "px";
                d[A] = a.size[A] + "px";
                d.overflow = "hidden";
                c.innerHTML = a.ws();
                c.ns = l;
                this.Kb[v](this.Ta)
            }
            this.draw()
        }
    },
    Hg: function(a) {
        if (a && a instanceof Kb) {
            var b = this;
            L.load("marker", 
            function() {
                b.$w(a)
            },
            f)
        }
    },
    $w: function(a) {
        if (a instanceof Kb) {
            this.v.label = a;
            var b = this;
            this.v.label.ze || (this.v.label.ze = f, this.Mj = function() {
                b.v.label = k
            },
            this.v.label[B]("remove", this.Mj));
            if (this.map) {
                a.kd(this.map);
                if (a.F) this.fb[v](a.F);
                else a.F = Za(this.F, a.Sa()),
                a.F.K = a.K;
                var c = a.F.style;
                c.left = a.v.Y[y] + "px";
                c.top = a.v.Y[A] + "px";
                a.Qt(this)
            }
        }
    },
    Em: function() {
        function a(a, b) {
            b.pixel = b.Aa = a.Aa;
            b.point = b.N = a.N;
            return b
        }
        function b(a) {
            var b = a.clientX,
            c = a.clientY;
            a.changedTouches && (b = a.changedTouches[0].clientX, c = a.changedTouches[0].clientY);
            return new S(b, c)
        }
        if (this.F && !this.F.ze) {
            this.F.ze = f;
            var c = this.map,
            d = this,
            e = 0,
            g = 0,
            i = 0,
            j = {
                x: 0,
                y: 0
            };
            this.Hi = function(a) {
                if (d.v.nb && 2 != a.button) {
                    d.Gf = f;
                    var j = c.$a(d.N),
                    s = b(a);
                    e = s.x - j.x;
                    g = s.y - j.y;
                    i = Ia();
                    d.map.B.Qj = d;
                    C.C(document, "mousemove", d.Je);
                    C.C(document, "mouseup", d.Ie);
                    C.C(document, "touchmove", d.Je);
                    C.C(document, "touchend", d.Ie);
                    d.F && d.F.setCapture && d.F.setCapture();
                    d.F.style.cursor = d.v.Bc;
                    "touchstart" == a.type && pa(a)
                }
            };
            this.Je = function(i) {
                if (d.Gf && (i = b(i), j = i = new S(i.x - e, i.y - g), d.pm = i, d.v.Lt && 15 < i.x && i.x < d.map[y] - 15 && 30 < i.y && i.y < d.map[A] - 15 || !d.v.Lt)) {
                    var q = d.map.Ma(i),
                    s = {
                        Aa: i,
                        N: q
                    };
                    d.Of = d.Pf = 0;
                    if (20 >= i.x || i.x >= d.map[y] - 20 || 50 >= i.y || i.y >= d.map[A] - 10) {
                        if (20 >= i.x ? d.Of = 8: i.x >= d.map[y] - 20 && (d.Of = -8), 50 >= i.y ? d.Pf = 8: i.y >= d.map[A] - 10 && (d.Pf = -8), !d.uc) d.uc = setInterval(function() {
                            c.Od(d.Of, d.Pf, {
                                noAnimation: f
                            });
                            var a = c.Ma(d.pm);
                            d.ca(a)
                        },
                        30)
                    } else d.uc && (clearInterval(d.uc), d.uc = k),
                    d.ca(q);
                    d.Af || (d.dispatchEvent(a(s, new Q("ondragstart"))), d.Af = f, d.v.It && (d.Gg(3), U.Ku(d.v.Jd.anchor, d.fb)));
                    d.dispatchEvent(a(s, new Q("ondragging")))
                }
            };
            this.Ie = function() {
                d.F && d.F.releaseCapture && d.F.releaseCapture();
                d.Gf = l;
                d.map.B.Qj = k;
                C.qc(document, "mousemove", d.Je);
                C.qc(document, "mouseup", d.Ie);
                C.qc(document, "touchmove", d.Je);
                C.qc(document, "touchend", d.Ie);
                e = g = 0;
                d.uc && (clearInterval(d.uc), d.uc = k);
                if (100 <= Ia() - i && (2 < j.x || 2 < j.y)) d.Af = l,
                d.dispatchEvent(a({
                    Aa: d.map.$a(d.V()),
                    N: d.V()
                },
                new Q("ondragend"))),
                d.v.It && (d.Gg(4), U.Hw()),
                j.x = j.y = 0;
                d.Vf();
                d.F && (d.F.style.cursor = d.v.Jc ? "pointer": "")
            };
            C.C(this.F, "mousedown", this.Hi);
            C.C(this.F, "touchstart", this.Hi)
        }
    },
    ca: function(a) {
        a instanceof K && (this.N = this.v.N = new K(a.lng, a.lat), this.draw())
    },
    Vf: function() {
        var a;
        this.Gf == f ? a = U.Mp: this.v.So == f ? a = U.Ij + (this.Xp || 0) : eb(this.zIndex) ? a = this.zIndex: (a = 0, this.map && this.V() && (a = Db.Vi(this.V().lat) + this.v.Gr));
        this.F && (this.F.style.zIndex = a);
        this.fb && (this.fb.style.zIndex = a)
    },
    Hh: function(a, b) {
        this.v.So = !!a;
        a && (this.Xp = b || 0);
        this.Vf()
    },
    xb: function(a) {
        this.v.title = a + "";
        this.F && (this.F.title = this.v.title)
    },
    nc: function(a) {
        a instanceof P && (this.v.Y = a, this.ca(this.V()))
    },
    Gg: function(a) {
        var b = this;
        L.load("markeranimation", 
        function() {
            b.Yw(a)
        },
        f)
    },
    Yw: function(a) {
        if (this.Rc) {
            this.Yu(a != k);
            var b = Qb[a];
            b && (b = b ? b.options.mu: l, !Da() || b ? this.uv(a) : this.tv(a))
        }
    },
    Yu: function(a) {
        this.hq(this.Rc);
        this.hq(this.Ta);
        if (a) {
            if (this.Xe && (this.Xe.stop(), this.Xe = k), this.Rc.style.top = this.Rc.style.left = "0px", this.Ta) this.Ta.style.top = this.Ta.style.left = "0px"
        } else if (this.Xe) {
            var b = this;
            this.Xe.AA(function() {
                b.Xe = k
            })
        }
    },
    tv: function(a) {
        var b = Qb[a],
        a = U.zv(a);
        this.fr(this.Rc, a[0], b);
        this.fr(this.Ta, a[1], b)
    },
    hq: function(a) {
        a && (a.style.WebkitAnimation = "", C.qc(a, "webkitAnimationEnd", U.cq))
    },
    fr: function(a, b, c) {
        a && (C.C(a, "webkitAnimationEnd", U.cq), a.style.WebkitAnimation = b + " " + c.options.duration + "ms" + (c.options.loop == Ta.Og ? " infinite": ""))
    },
    uv: function(a) {
        var b = this.Rc.style,
        c = l,
        d;
        this.Ta && (c = f, d = this.Ta.style);
        var e = Qb[a],
        g = this,
        i = e.wg[w],
        j = e.options.duration,
        n = g.Xe = new Ta({
            duration: 0,
            gf: Ta.Og
        }),
        q = e.wg,
        s = e.qj;
        b.top = q[0].translate[1] + "px";
        c && (d.left = s[0].translate[0] + "px", d.top = s[0].translate[1] + "px");
        for (var z = 1; z < i; z++)(function() {
            function a() {}
            var b = [q[z].translate[0] - q[z - 1].translate[0], q[z].translate[1] - q[z - 1].translate[1]],
            d = [q[z - 1].translate[0], q[z - 1].translate[1]];
            if (c) var G = [s[z].translate[0] - s[z - 1].translate[0], s[z].translate[1] - s[z - 1].translate[1]],
            ha = [s[z - 1].translate[0], s[z - 1].translate[1]];
            var D = Ua[q[z - 1].Oa];
            z == i - 1 && (a = e.options.loop != Ta.Og ? 
            function() {
                g.Xe = k
            }: function() {
                g.Xe.start()
            });
            n.add(new Ta({
                duration: (e.wg[z].La - q[z - 1].La) * j,
                Nc: 40,
                gf: Ta.Og,
                ud: D,
                Sa: function(a) {
                    if (g.Rc) g.Rc.style.top = d[1] + p.round(a * b[1]) + "px";
                    if (c && g.Ta) {
                        g.Ta.style.left = ha[0] + p.round(a * G[0]) + "px";
                        g.Ta.style.top = ha[1] + p.round(a * G[1]) + "px"
                    }
                },
                finish: a
            }))
        })();
        n.start()
    }
});
Z(Nc, {
    setIcon: Nc.se,
    setPosition: Nc.ca,
    setOffset: Nc.nc,
    setLabel: Nc.Hg,
    setTitle: Nc.xb,
    setTop: Nc.Hh,
    setAnimation: Nc.Gg,
    setShadow: Nc.Hl,
    show: Nc.show,
    hide: Nc.G,
    remove: Nc.remove
});
Ib[u].ws = function() {
    var a = "",
    a = "",
    b = this.imageUrl,
    c = this.imageOffset,
    d = this.imageSize;
    6 == C.O.T && 0 < b.toLowerCase().indexOf(".png") ? (a = ["<div"], this.printImageUrl && a.push(' class="BMap_noprint"'), a.push(' style="width: 1px; height: 1px;'), a.push("; left:" + c[y] + "px"), a.push("; top:" + c[A] + "px"), a.push("; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image,src='" + b + "')"), a.push('; position:absolute;"></div>'), this.printImageUrl && (a.push('<img class="BMap_noscreen" style="border:none;left:' + c[y] + "px;"), a.push("top:" + c[A] + 'px;position:absolute" src="' + this.printImageUrl + '" />'))) : (a = ['<img src="', b, '" style="border:none;left:' + c[y] + "px", "; top:" + c[A] + "px", "; position:absolute;"], d && a.push("; width:" + d[y] + "px; height:" + d[A] + "px;"), a.push('" />'));
    return a = a.join("")
};
C[x](Kb[u], {
    Rh: function() {
        var a = this.v,
        b = this.content,
        c = M("label", {
            "class": "BMapLabel",
            unselectable: "on"
        });
        a.title && (c.title = a.title);
        var d = c.style;
        d[la] = "absolute";
        d.MozUserSelect = "none";
        0 == a[y] || "auto" == a[y] ? d.display = "inline": (d[y] = a[y] + "px", d.display = "block", d.overflow = "hidden");
        "true" == a.Jc ? d.cursor = "pointer": C.O.T || (d.cursor = "inherit");
        c.innerHTML = b;
        this.map.ge().Xs[v](c);
        this.F = c;
        this.Jb(a.Kh);
        return c
    },
    ca: function(a) {
        a instanceof K && !this.al() && (this.N = this.v[la] = new K(a.lng, a.lat), this.draw())
    },
    draw: function() {
        if (this.F && this.V() && !this.al()) {
            var a = this.v.Y || new P(0, 0),
            b = this.map.Pd(this.V());
            this.F.style.left = b.x + a[y] + "px";
            this.F.style.top = b.y + a[A] + "px";
            this.Vf()
        }
    },
    Ob: function() {
        this.map && !this.fk && (this.F = this.initialize(this.map), this.draw())
    },
    ac: function(a) {
        this.content = a;
        this.F && (this.F.innerHTML = a)
    },
    GA: function(a) {
        0 <= a && 1 >= a && (this.v.opacity = a);
        if (this.F) {
            var b = this.F.style;
            b.opacity = a;
            b.filter = "alpha(opacity=" + 100 * a + ")"
        }
    },
    nc: function(a) {
        a instanceof P && (this.v.Y = new P(a[y], a[A]), this.al() && this.F ? (this.F.style.left = a[y] + "px", this.F.style.top = a[A] + "px") : this.draw())
    },
    Jb: function(a) {
        a = a || {};
        this.v.Kh = C[x](this.v.Kh, a);
        if (this.F) for (var b in a) try {
            this.F.style[b] = a[b]
        } catch(c) {}
    },
    xb: function(a) {
        this.v.title = a + "";
        this.F && (this.F.title = this.v.title)
    }
});
Z(Oc, {
    setStyle: Oc.Jb,
    setContent: Oc.ac,
    setPosition: Oc.ca,
    setOffset: Oc.nc,
    setTitle: Oc.xb
});